package icegps.com.bhmap.utils;

import android.os.Handler;
import android.widget.Toast;

import icegps.com.bhmap.App;


/**
 * Created by 111 on 2017/11/21.
 */

public class Init {
    private static Toast toast;
    private static Handler handler;

    static {
        handler = new Handler();
    }

    public static void showToast(String content) {
        if (toast == null) {
            toast = Toast.makeText(App.getInstance(), content, Toast.LENGTH_SHORT);
        } else {
            toast.setText(content);
        }
        toast.show();
    }

    public static void post(Runnable runnable) {
        handler.post(runnable);
    }

    public static void postDelayed(Runnable runnable, int delayMillis) {
        handler.postDelayed(runnable, delayMillis);
    }


}
